import { BrowserModule } from '@angular/platform-browser';
import { NgModule,SecurityContext } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HomeComponent } from './components/home/home.component';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import {LightboxModule} from 'primeng/lightbox';
import {ToastModule} from 'primeng/toast';
import {PasswordModule} from 'primeng/password';
import {InputTextareaModule} from 'primeng/inputtextarea';
import { LocationStrategy, HashLocationStrategy,DatePipe } from '@angular/common';
import { GalleryComponent } from './components/gallery/gallery.component';
import { LogsAndBugsComponent } from './components/logs-and-bugs/logs-and-bugs.component';
import { ResumeComponent } from './components/resume/resume.component';
import {SelectButtonModule} from 'primeng/selectbutton';
import { MonumentComponent } from './components/monument/monument.component';
import { MessageboardComponent } from './components/messageboard/messageboard.component';
import { CookieService } from 'ngx-cookie-service';
import { AdminmanagerComponent } from './components/adminmanager/adminmanager.component';
import { NavibarComponent } from './components/navibar/navibar.component';
import { ProfilesComponent } from './components/adminmanager/joinus/profiles/profiles.component';
import { AboutusComponent } from './components/aboutus/aboutus.component';
import { NotebookComponent } from './components/tutorial-editable-template/notebook/notebook.component';
import { FooterComponent } from './components/footer/footer.component';
import {DynamicDialogModule} from 'primeng/dynamicdialog';
import {FileUploadModule} from 'primeng/fileupload';
import {TooltipModule} from 'primeng/tooltip';
import {MessagesModule} from 'primeng/messages';
import {MessageModule} from 'primeng/message';
import {DialogModule} from 'primeng/dialog';
import {TabViewModule} from 'primeng/tabview';
import {EditorModule} from 'primeng/editor';
import {TableModule} from 'primeng/table';
import { MarkdownModule,MarkedOptions } from 'ngx-markdown';
import {ScrollPanelModule} from 'primeng/scrollpanel';
import {AccordionModule} from 'primeng/accordion';
import {PanelMenuModule} from 'primeng/panelmenu';
import { JoinusComponent } from './components/joinus/joinus.component';
import { Game2020Component } from './components/game2020/game2020.component';
import { MdrenderComponent } from './components/mdrender/mdrender.component';
import { Game2019Component } from './components/game2019/game2019.component';
import {TreeModule} from 'primeng/tree';
import { GatewayComponent } from './components/gateway/gateway.component';
import { TutorialTemplateComponent } from './components/tutorial-template/tutorial-template.component';
import { TutorialEditableTemplateComponent } from './components/tutorial-editable-template/tutorial-editable-template.component';
import { TutorialEditableContentComponent } from './components/tutorial-editable-template/tutorial-editable-content/tutorial-editable-content.component';

import { CommentComponent } from './components/comment/comment.component';
import { UserComponent } from './components/user/user.component';
import { BlogComponent } from './components/blog/blog.component';
import { BlogListComponent } from './components/blog/blog-list/blog-list.component';
import { HtmlPipe } from './utils/pipe';
import { MessageService } from 'primeng/api';
import { RegisterComponent } from './components/adminmanager/usermanager/register/register.component';

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    GalleryComponent,
    LogsAndBugsComponent,
    ResumeComponent,
    MonumentComponent,
    MessageboardComponent,
    AdminmanagerComponent,
    NavibarComponent,
    ProfilesComponent,
    AboutusComponent,
    NotebookComponent,
    FooterComponent,
    JoinusComponent,
    Game2020Component,
    MdrenderComponent,
    Game2019Component,
    GatewayComponent,
    TutorialTemplateComponent,
    TutorialEditableTemplateComponent,
    TutorialEditableContentComponent,
    CommentComponent,
    UserComponent,
    BlogComponent,
    BlogListComponent,
    HtmlPipe,
    RegisterComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    FormsModule,
    ReactiveFormsModule,
    LightboxModule,
    ToastModule,
    PasswordModule,
    InputTextareaModule,
    SelectButtonModule,
    HttpClientModule,
    FileUploadModule,
    TooltipModule,
    MessagesModule,
    MessageModule,
    DialogModule,
    DynamicDialogModule,
    EditorModule,
    TableModule,
    TabViewModule,
    MarkdownModule,
    ScrollPanelModule,
    AccordionModule,
    PanelMenuModule,
    TreeModule,
    MarkdownModule.forRoot({
      loader: HttpClient,
      sanitize: SecurityContext.NONE,
      markedOptions: {
        provide: MarkedOptions,
        useValue:{
          gfm: true,
          breaks: false,
          pedantic: false,
          smartLists: true,
          smartypants: false,
        }
      }
    }),
  ],
  providers: [
    { provide: LocationStrategy, useClass: HashLocationStrategy },
    DatePipe,CookieService,MessageService
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
